<?php
if (!function_exists('setCache')) {
  function setCache($filename, $filecontents) {
    global $fc;
    $fc->unlock($filename);
    $output = serialize($filecontents);
    $fp = fopen($filename,"w+"); // open file with Write permission
    if($fp){
    fputs($fp, $output);
    fclose($fp);
    }
    $fc->relock($filename);
  return $filecontents ;
  }
}
if (!function_exists('getCache')) {
  function getCache($filename) {
    return unserialize(file_get_contents($filename));
  }
}

